package omit.wage.controller;


import omit.wage.result.PageResult;
import omit.wage.result.Result;
import omit.wage.service.IDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-06-11
 */
@RestController
@RequestMapping("/department")
public class DepartmentController {
    @Autowired
    private IDepartmentService iDepartmentService;

    @GetMapping
    public Result list(){
        PageResult pageResult = iDepartmentService.select();
        return  Result.success(pageResult);
    }
}
